package lec02.am;

import java.util.Arrays;
import java.util.Random;

import eq.util.MyArray;

public class ArrayPrint {

	/**
	 * @param args
	 */
	public static void main(String[] args) {
		int a[]=new int[100];
		Random r=new Random();
		for (int i = 0; i < a.length; i++) {
			a[i]=r.nextInt(100);			
		}
		MyArray.printArr(a);
		Arrays.sort(a);
		MyArray.printArr(a);
	//	float b[]={1.0f,3.2f,6.5f,0.0f};
	//	MyArray.printArr(b);
		int pos=Arrays.binarySearch(a, 50);
		if(pos<0)
			System.out.println("Not Found!");
		else
			System.out.println(String.format("%d at Pos %d:",50,pos));

	}


}
